#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :factorial_16.py
# @Time      :2020/6/22 11:48
# @Author    :Administrator

input_number = int(input('请输入一个数：'))
factorial = 1

if input_number < 0:
    print('抱歉，负数没有阶乘')
elif input_number == 0:
    print('0的阶乘为1')
else:
    for i in range(1, input_number + 1):
        factorial = factorial * i
    print('%d的阶乘为%d' % (input_number, factorial))
